﻿using System;
using System.Collections.Generic;
using FytSoa.Core.Model.Sys;
using FytSoa.Core.Model.Cms;
using SqlSugar;
using FytSoa.Common;

namespace FytSoa.Service.DtoModel
{
    /// <summary>
    /// 返回给客户端的用户评论信息
    /// 小程序首页
    /// </summary>
    public class AppCommonDto
    {
        /// <summary>
        /// Desc:唯一ID
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string Guid { get; set; }

        /// <summary>
        /// Desc:归属栏目ID
        /// Default:
        /// Nullable:False
        /// </summary>           
        public string ColumnId { get; set; }

        /// <summary>
        /// Desc:评论人ID
        /// Default:0
        /// Nullable:True
        /// </summary>           
        public string UserId { get; set; }

        /// <summary>
        /// Desc:评论人昵称
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string UserName { get; set; }

        /// <summary>
        /// Desc:头像
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string HeadPic { get; set; }

        /// <summary>
        /// Desc:评论内容
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string Summary { get; set; }

        /// <summary>
        /// Desc:评论时间
        /// Default:
        /// Nullable:False
        /// </summary>           
        public DateTime AddDate { get; set; } = DateTime.Now;
    }

    /// <summary>
    /// 返回给客户端用户信息
    /// 小程序首页
    /// </summary>
    public class MemberDto
    {
        public string  Guid { get; set; }

        /// <summary>
        /// Desc:真实姓名 真实姓名
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string NickName { get; set; }

        /// <summary>
        /// Desc:头像 头像
        /// Default:
        /// Nullable:True
        /// </summary>           
        public string HeadPic { get; set; }

        /// <summary>
        /// Desc:积分 积分
        /// Default:0
        /// Nullable:False
        /// </summary>           
        public int Point { get; set; } = 0;
    }

    /// <summary>
    /// 微信小程序 接口输出对象
    /// 小程序首页
    /// </summary>
    public class CircleIndexDto
    {
        public CmsSite site { get; set; }

        /// <summary>
        /// 首页栏位
        /// </summary>
        public List<SysCode> code { get; set; }

        /// <summary>
        /// 首页广告位
        /// </summary>
        public List<CmsAdvList> adv { get; set; }

        /// <summary>
        /// 第一页的新闻列表
        /// </summary>
        public Page<CircleArticle> list { get; set; }=new Page<CircleArticle>();

    }

    /// <summary>
    /// 返回给客户的文章列表
    /// </summary>
    public class CircleArticle
    {
        /// <summary>
        /// 文章唯一编号
        /// </summary>
        public int id { get; set; }

        /// <summary>
        /// 文章标题
        /// </summary>
        public string title { get; set; }

        /// <summary>
        /// 文章描述
        /// </summary>
        public string summary { get; set; }

        /// <summary>
        /// 文章图片
        /// </summary>
        [SugarColumn(IsJson = true)]
        public List<ArticleImageJson> img { get; set; } = new List<ArticleImageJson>();

        /// <summary>
        /// 文章评论数
        /// </summary>
        public int commonCount { get; set; } = 0;

        /// <summary>
        /// 文章编辑时间
        /// </summary>
        public DateTime editTime { get; set; }

        /// <summary>
        /// 文章属性  0  1  2
        /// </summary>
        public int attrType { get; set; }

        /// <summary>
        /// 是否热门
        /// </summary>
        public bool isHot { get; set; } = false;
    }
}
